#ifndef __TIME_H
#define __TIME_H

#define MeasureFerquency             (float)(72000.0f)   
#define MeasureGet()                 (uint32_t)(SysTick->VAL)
#define TM_LOAD_VALUE                (uint32_t)(SysTick->LOAD)
#define SYS_TICKDIFF(current, start) ((current >= start) ? (uint32_t)(current - start) : (uint32_t)(TM_LOAD_VALUE - start + 1 + current))

void time_init(void);
float time_get_ms(uint32_t *thread_tick);

#endif
